<?php if(! defined("BASEPATH")) exit("No direct access allowed!");
	
class User_model extends CI_Model {
	private $userdb='user';
    public function __construct()
   	{
       $this->load->database();
        parent::__construct();
    }
    public function get_user($phone = FALSE)
    {
        if ($phone === FALSE)
        {
            $query = $this->db->get('user');
            return $query->result_array();
        }
        $query = $this->db->get_where('user', array('phone' => $phone));
        return $query->row_array();
    }
    public function modify_user_info($userinfo){ 
        $result = $this->db->replace('user', $userinfo);
        return $result;
  	
    }

}
?>